package com.example.kotlinstudy.基本语法

//fun com.example.kotlinstudy.类与对象.main() {
//    println("Hello World");
//}

//fun com.example.kotlinstudy.类与对象.main(args: Array<String>) {
//    println(args.contentToString())
//    print("Hello")
//}

//fun com.example.kotlinstudy.类与对象.main() {
//    print("sum of 3 and 5 is")
//    println(sum01(3, 5))
//    println(sum(3, 5))
//    printSum(-1, 8)
//
//}
//fun sum01(a: Int, b: Int): Int {
//    return a + b
//}
//fun sum(a: Int, b: Int) = a + b
//fun printSum(a: Int, b: Int) {
//    println("sum of $a and $b is ${a + b}")
//}

var x = 0
fun main() {
    val a: Int = 1
    val b = 2
    val c: Int
    c = 3
    println("a = $a, b = $b, c = $c")

//    var x = 5
//    x += 1
//    println("x = $x")

    val PI = 3.14
    println("x = $x; PI = $PI")
    incrementX()
    println("incrementX()")
    println("x = $x; PI = $PI")
}

fun incrementX() {
    x += 1
}